tested with more possible cases