Revert "malfunctioning code"

This reverts commit da7d1b53ec0f2a1e9327a4ba0ad4325d94dc62bf.