class methods can now be exported even if tail recursive