Removed unused TAG field.
Added specific typecast to resolve warning: "non-varargs call of varargs method with inexact argument type for last parameter".
Simplified logic expression.