Add a comment here explaining what the following 3 lines do, as they seem to do a lot