added code to easily disable main function if desired