Changed string.gfind to string.gmatch to add lua 5.2 compatibility