rename function
use integer max and min value instead of 2 and -2
rebuild