made class more usable; safeguards