simplest example works, ugly code though :)