Made some changes via darcy's feedback