add stop-instances, wait-for-instance-state functions