basic validation implemented