correct prototypes
reformat source code