ticket 9: made script write to