fix image and add some test code