fix variable name
refactor immediate_rep