Add 2d and 2h function