update with suggestions from _|Nix|_ and jsonDscott