Implemented insert_right function