Adding comment and reconstruct the code