added fill in middle algorithm