changed to pass in creds rather than read from file