refactor rename two readonly-related functions