Working minimal solution