Implement cpu part of task 5.3