First try of combination implementation

please fix the ugly global variable using, didn´t know how to deal with
it in the short time ;)