Function doesn't follow idiomatic erlang for return values.