Adding function registration