better tests and fix compile