Revert "unneccessary code removed. method chaining added."

This reverts commit d4be4769ba1b788a0525fc19ed7c8fba436caaae.