improved invoke, now with return values!