refactor api routing and added new advice model