some minor refactoring
ie8