Added onAvailable utility