updating function names inside files

also initializing pos and I