write and cal