some script snippets