works for most cases