minor changes
fixed it
refactored queue and added tests