cleaned up test and optimized import