expand and collapse codes done