rewrote domain side calsses