implements closing view

logic to close a view