added basic validation method