wip refactor value extraction