fixed some horrible api stuff