add constant time comparison