Implemented Q library