added documentation for validate_signature func