2014.11.20.2023 : updates and corrections after testing on dirac