Implementing multitasking part.