add try block to avoid error if empty params