fixing cpu usage