minor change for aesthetics
change mission thread to a compiled function