skeleton code, code dump from parent project, needs lots of cleaning