split to smaller functions
add test data dir to gitignore