combined script - first working draft