begin to write particle detector