added constructor function
Added insert method