implemeted Queue methods