Code optimize(a bit like SB)