Need to debug, but skeleton is there.