remove static from functions that use this