added check for next case or end select stmt after select case