changed code to AutoClose

added automatic setup build