insert function now inserts at a random position with a random direction