added api, validation and testing to specification