further simplification of original logic