Could you put the 'Memory' as an option to this function (that can have 'Memory' as a default value). That way the function is useful in different contexts.