write, create snippet related functions added