adding the molesensors code (messy version)