function in EScript binding