some performance enhancements