fixed various bugs; recoded importing process