Revert "Revert code"

This reverts commit 5ead37baf17ea0588db72e04ffa12f6f514055e1.