Improve coffee.function