I think your problem is very similar to this one from a few weeks ago, it might be of inspiration for a solution to your?