add function prototypes to header, move function implementations to cpp file