Refactor tickets

better define a helper for whole line