MOD: cleaning up function composition, removing the repeated in-out evaluation