now with try catch in getSpikes()