moved method to utils class