New implementation of stack and its basic operations