large api change, making identity function more generic