removed dead legacy code