Updated for a more VMC approach, suggested by keltonkowalchuk