Added another getKey at the end of analyzeSGP