updated comments and resolved bug in header files