updated view logic