refactor imageloader