updated with Elliott's feedback: