respect original logic; be more efficient