change adapter to private static inner class