popup and validation