added a functional queue