reverting faulty logic