using a deque to keep track of lines
optimizing scoring and editing static location