added script key and value check