made changes to the business logic

made changes to the api function names, added more test