v1.1 - improved, faster with better memory management