added cmake script, removed 'using std'
fixed insertion at front instead of at the correct interval