moved some preprocess in module to avoid theme leve logic implementation