import sys for debugging purposes