Added acceptance probability and fixed division.