fixing imports and formatting code