cleaning up code and added a half-baked maybe monad. dont use it yet. it doesnt work