Revert "removed useless lines of code"

This reverts commit ea57a3a957d6388f289a63507a7ced3096fa3add.