Use bimap to reduce # of times iterating over all pieces