remove unnecessary computation