added a few comments and created a headerfile