updated cred handling