rename functions, update api, add type validation, update readme