added rem value function