setup return value from function