additional safe gaurds and tests.
rename couple of methods to reflect the use.