Update 21 OCT 2013

improved some code, only tested on x86