view rendering made separate from api