complete re-do of original script