only works for some cases