fixed trash func