refactored add method to be enqueue