copied over broken code
copied over broken code
adding validate api
It's working!