moved more functions to utils