encapsulate merp.py and begin debugging for functional programming issues (self)