changed statusfunc to a struct