almost finish CircleMain TODO - fix history