Added basic validation checking