adding better validation error