added a couple of usestrict missing. aligned case statement with switch