add THROW for functions returning