added basic working code