Revert "Got rid of uncessary code"

This reverts commit f40ee357c3845db0ec4064169195d21ef83c7868.