added challenge mode functionality