adding some working code