Snippet updated to have better readability