implemented wrap modes; defined a new class (ETCoords), redefined all manipulations with coordinates to use this new class