changed a use of rem to mod so the use of the remainder function is not confused with arc's rem for removing elements from a list