implemented queue, tests working.