'effects' function for structures