added close figure function