Bugs are fixed and null distribution estimation is added