added setting active states for subImages