Modified api controller