plotting improvements & write function