a simple mvc implementation