remove unused import
Fix bug in processing loop, add resolution option