added start of spiral algorithm