This can get quite complicated. As it is quite a few variables at work here. But here are some ideas that may help?