[update] chaining statements to become python 3 compatible