check rem function working now