Embedding functions directly in HTML block