Added comments, fixed mutation function