added a test library
fixed some bugs in monolith