corrected variable names
updated Queue implementation