added variable delay to monitoring program