added implementation of the QBall data structures