removed useless assignments at some places