in method isActive changed check from checking variable is array to checking if it is not empty