Adding the non-working code to the working standalon.