added key as parameter to create_ISid function