updated for validation