PA-63 #comment: more bug fixing - now storing correct array from last completed tasks
PA-63 #comment: now the correct next task is selected from database and displayed to the user - if no more available the user is done