adding some basic validation