updated implementation
added methods push, pop, getTop