implemented logic for acc/break