implement core functions for tuplemap