implemented domain clamping