adding dnn.py (and other updates)