add basic functional queue