main function initialized