Removed goto in favor of z