Commented function that supposedlynot working correctly