update files
add detect game function