implemented more of Rick's changes