refactor and split all utils