passing data to templates