refactor to remove stale code