Improved write method by removing the need for line and column parameters