refactoring controller api
refactoring controller api