refactored with remote true, removed one ajax call