how to debug and use user defined functions?