basic refactoring that may be broken. has no data.