added cv for terka + refactoring
other improvements