typo fix & write method