First working Version. Maybe a bit ugly, but it works... ;)