working on api controller