cleaned working magic linking