ready for templates. need error messages