supports theme function

fixes #1