Reduced the cpu usage