final version which was presented @deepsec 2013