after successfully adding code to get the sec key.