corrected call to custom function