Added a second version using multimethods