Added prototype function code.
Added comma separator in output.