working python3 pulse monitor