updated and cleaned