implement complecated validation