fixing up api stuff