added extreme case checks, furthur testing for basics will need to be done