added validation  bugfux