Think I merge all of thomas work, but haven't error checked yet