working on joint distribution fromcosmos