bugs fixed, works on mac and ubuntu now.