Added functions clip and square