add comments, remove console debug