Added 1d working sol, added code for 4c