completed check for last option functionality