scripts to implement simple function