bringing in changes from api project...they belong here now