fix rem to use base