added code to compute spike triggered average