queue library for generic queue