commented code, began adding protections