nasty
work in progress :)