more slight performance improvements. preparation for more performance friendly code