initial work. seems to work, but has absolutely no error checking