removed all panics across the board. welcome a slightly more idiomatic go-style