adding modal and detail state