added missing pragma. revert to statics and const for general functions