use stringObjectFunction and more generic variable input