Added documentation for first and second stage