add function prototypes to header and move implementations to cpp file