initial commit. based on script by brandon martin anderson