Validate prompts and array

added prompt checks and set array