Add comment and clean code