Added a header
Implemented functions