implemented a simple static wrapping algorithm. There are plenty of bugs, but it works.