last changes to add api controller