task scheduling ver. 2