replaced deprecated bind() method