fixed incorrect output source code