added pinhole validation