trying to solve pyramid