put validation in init method