Add defnesive code.
Use clearer identiiers.