should check an array of integers for dublicates using a pointer. doesn't work though