adding throw npe in queue class constructor