big fix and revision to version 3
small bugfix, no signficant performance impact
added intel flags to makefile