closure added

add closure for the best defence of code