Adding solution 4