Validation Added, Slight Change in query