move entry point to top of code so that profil will work right