[IMP] improved code