changed valToBinary syntax and added note
changed NULL to nullptr everywhere