remade as a library application