refactor obsolete code