added return value param to script function