Working sollution for assignment