It doesn't look like you use m in this function