remove code dup for constants