added autoclose property