extract code into helper library, added passenger