this should be in template