Move thrust into a function to be used by ai