make slaveMem the 4th argument after "mem".