improving code, get away from keys