replace Object.getOwnPropertyNames with Object.keys