genericize the function list class