changed splice method to work when adding to empty list, also replaced i with t in one of the find functions in splice