cleaned up api some