added legend plugin
updated script files