added new z_index method for images