mini logic and validation improvements