Cleaned script but needs to be fixed