update, also win algo added