updating to validate key (issue #5)