cleaning up code from api change