a failed attempt at figuring out rest. does not even compile