some validation and user states