added more sanity checking on input to only allow letters/numbers thanks to @gregjurman