adding basic validation