added close at end