changed script editing and handling