commented logic