hi alain and charles

thanks a lot for the inputs.
i replaced the resistor in the schematic with a 10k and it works fine now.