updated gitignore
moved main function up