fixing performance problems