update example scripts to v2.4
change version to 2.4
updating text example

shows using function as a parameter