started adding some defensive coding. next commit will add early stopping with patience, rectified linear, and dropout