just explaining some not so great code