minor refactor
fixed tests