Computer Science programming task