apparently ubuntu needs -pthread in order to do threads