finished writing librery2.cpp