some optimiz and cleanning