finished implementing API data validation