removed unnecessary switchings//etc