wrote resource monitor script