some function that I use to write script