This is the base code still needs some work.