Changed to method render instead of using template function