clearing w in a cleaner way