library build (incomplete)