Logic works, missing edge cases