Added validation method