refactoring queue to promises. tightening up timeouts in tests