Tuple class implementation