working implementation of constant and high_low