added a method to check for given params