view logic