cleaned up break erorrs, and array is indexed issues