refactored stuff into request