add comments and final touches