add utils for data, refactor tests