added some semantic validation