added compiler optimizations back in