added working code and some sample results