added the first partially working code