refactor read_apk