hot fixes / porting some rosetta code samples