Refactored api to accept every request