use template_directory_uri for assets in function. Fix issue #51