Added up and down actions
Adding advanced conditions