Implemented state mutation using lenses