refactor to the application controller and accept a jsonmodel instance to distinguish