allow parameters to be passed to from function
incorporate latest changes from updateFrom branch