first bug fixed and comments added