creating factory method for clicking calculator