removed unused imports
changed incompatible type in for-loop