adding pointer to value before returning -1 in main