changed return type to show it would return NO when the write is unsuccessful.