first modify
Monitor function implemented, not tested