finished implementing queue. might still have som errors