added imports and fixed pointers