initial commit

Try using the splice method to replace these two shifts: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/splice