changed validation to use an interface