thinking about how to deal with edge cases, may abandon for now