remove unneeded statements