bug fixed with help from Morten (the prof) ^^