use bracket notation instead of dot notation

fixes #959