change to allow multiple function calls