improving for validation