improved and cleaned