code optimization, squash bugs