minor refactoring, byte saving, up_n_down update