moved some static methods to Utils