refactor legacy code
removing dead legacy code