Splitting the task into two modules