finally worked out the pyramid issues