helpers for immutable code