improve queue class