Everything seems to work; just need to add comments