added templates
further improvement
from views to templates