more fixing now in main undefined references, but the functions are declared, and as static too, need to check