re-order code to avoids object moving