#17 #15 added amd support and configurable treshold