validation and other minor changes