added render logic to views
added render logic to views