Starting and switching threads properly (according to ph)