fixed queue implementation..continuing debug