added adaptive algorithm for stamp
added script for automating stamp testing