Refactored pyramid into function. Need to clean up now