optimization changes

optimization changes