Good job ! I've added comments in order to facilitate reading.