cleaned up api