lots of copy paste from my previous work....