refactoring
splitted util into model-related vs model-independent functions