6   @data instead of to json()

fixes #6