updated libraries, added event to signal flattening