Write function added
updated