Seems 99% finished, needs to be tested