removing legacy codes