added function prototypes to header, moved function implementations to cpp file