added some performance metrics and trying to figure out possible memory issues