Full Code by Sven