adding custom function