use dom pieces instead of alerts