optimize repository