refactor code, optimise execution
* clean up ruby code
* add parallel execution when possible