lock function, adjust ticket print format