clear function
clear = 1 not reset