removed pointer, fixed insertion bug. All working now