Inital implementation, untested.