added double validation