cast function as hash to get out values