created a method with parameters