[IMP] code optimization