Make line and rectanage work