editted checkLastReset to take in type parameter