remove unnecessary import
add Python 3 compatibility