updated for all modes