updated

added validation of input to only allow numbers