Adapted to newest libs
Testing