removed dead code + fixed CS