refactor data extraction routines :octocat: