update compilation and add tests