emtpy figure function fixed