Included one user defined function and used in flatmap