Added basic code for build_pyramid