moved req and res to applicaton and fixed routing