remove irrelevent code