how to use this magic function