remove unused import and stop using global