should this be called template_directory instead of just directory?