better way to fetch constants in view