added return to pop, type array change to E