afterMap and beforeMap feature (resolves #3)