code refactored due to changes in vkt7.py and mercury230.py