added utils function to main