implemented whitelist of allowed types in the scripts