added challenge create/update logic