Since this is public method, additional validation of the input parameters would be good.