Added Code for pyramid