taking care of faulty input