cleaned up api code