Refactoring variable names to match original paper