templates improvements