global object usage eliminated
unnecessary code removed