discard image for deleting a profile
added code for expansion and collapsing of profile