added UDF to generate session id