Added some extra logic-based validation