second solution added