setValue simplified and all working