Understanding how bacteria become sticky