What to do?

My boyfriend & I have been together for 1 year. I love him but the sex isnt the best. I keep having thoughts of having sex with someone else. What can I do to make things work?