created a util class and moved two methods in it