mvc logic