adding class to releted image