update - portable - working but not very good speedup