An immersed boundary method