move api to seperate file.. to ease life in the future