additions for optimization, import fixes