remove rem function