Functions for write and draw actually work!