remove more useless calculations