maybe small performance improvements
ready for hot code swapping