change validations to api methods