implemented init_with_creds