merged, fixed tests