changed write to take only one argument