WriteAttribute needs to take a params array and do some magic with it