migration to newer libs

this is a bit ugly, but I realized I promised it to you a while ago..