Extracting some methods to Util