Everything seems to be working properly except the insertAt() function.