fixed prototype, methods for array
throw exception when trying to call undefined function