got it working with custom function on master