adding first working code