9 failing tests but most recent solution is not elegant