add comments and crash handler