problems solved and improved view details
also updates tables correctly