Move utility method to Utils