removed Array.protoype.remove method, should use Array.splice instead.