removed faulty logic