added invertHigh() and invertLow() functions, made setSlow better