start converting profile api over to flask