updted validation