solve the problem when m is negative