maybe we should keep ``w`` as a reference here? make it a comment?