updated with context given by Spencer