cleaned up to be bare skeleton code