removed unused var. fixed switch: each clause HAS to end with either NEXT or break.