implement fundamental queue logic