some more setup

dummy error catching implemented, actual error checking to be coded
later.