functions of realism in literature