basic queue functionality finally working