refactor caculate surviver positions