moved common functions to UtilFuncs.java
moved common functions to UtilFuncs.java