added chop without recursion