added switch, remove unneeded method test tidied