My implementation of Cyrus's code assessement