tweaking monitor script