adding additional validation / edge case checking