You need to be really careful about indentation, especially when you're nesting several `if...else` blocks. It makes it easier to spot what's happening inside the method, whereas the logic here is pretty difficult to decipher as written.