Updated for the new Swift.