Optimize endpoint