removed references to object, changed operators, casting to reflect current program