added basic validation