using params instead of  array in the class construct method