Revert "trying to reorganize code"

This reverts commit f995c67f44c0b6c0034f57bc79c1b3706b195619.