slightly better flight algorithm