Added a better function-snippet