optimize registers a little