Add sprintf method