prototype and minor code reformat