fixed test and added better comments