sleep 1 is ugly, but works for now