added main function and used global utils