added comments to make code more readable, only need to add syntax-expand for assignment 16