Optimize solution to p110