reimplemented lost code
disabled inline switching with macros as it does not work. relying on compiler arguments to disable inline