refactoring promise for submitRequest