fixing dead code