added function declarations
Implemented left and right push