J: fixed add

might want to double check that global is set correctly