some minor performance improvements