Mix the hamburger, chili, and the enchilada sauce together. Add green chilies to the mixture if desired. Put a little sauce in the bottom of the pan. Start layering with some of the sauce, beans, tortillas, onions, cheese and sour cream. Start the next layer with some of the sauce, beans, tortillas, onions, cheese and sour cream. The last layer is the remaining sauce and cover with the remaining cheese. Cover with foil and bake for 30-40 minutes