zara128 code refactored