api working just need to add logging