Good idea to take it out into separate utility class.