Made loop
Commented more
fixed null pointer