removing superflous code