added visit controller

adhered to MVC