validation and loading