added function void param and EOF newline to comply with C standard