implemented 2d transfer function