Added stuff for optimization