How to use "behave" in a sentence

Sentences

They plugged it in and tried to get it to repeat what it had done earlier, but they had no luck; the machine behaved exactly as it was meant to behave.

Because someone who had just committed a murder would, of course, try to behave normally

'No, it's just that women allow them to behave the way they do instead of taking some freedom themselves.'

'Well, if I had the chance to behave the same way,' said Connie, 'I wouldn't make use of it.'