updated analyzing script