some simple function utilities