Converted to new lib refactoring