call setValue() in constructor correctly