minor fix
code improvements + new util.py file