major fail, reevaluate writing method