Functions, but requires tweaking