Added an implementation of pop method that delete an element and return a pointer on it