Fixed the reference to the lib + added code for chaining