made sure things compile. fixed linking order