added imports and some other fixes