[IMP] improve code