Use decorator in all function instead